<!DOCTYPE HTML>
<html lang="en">
<head>
  <meta name="copyright" content=
  "Copyright (c) IBM Corporation and others 2000, 2011. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.">
  <meta charset="utf-8">
  <link rel="STYLESHEET" href="../book.css" type="text/css">
  <title>Executing Project Builders</title>
</head>
<body>
  <h1>Executing Project Builders</h1>
  <p>The whole point of project builders is that you don't need to explicitly tell them to run. Instead, they run
  automatically whenever a qualifying build takes place for the project that owns the buildfile. Remember that the
  builders are triggered as indicated on the <strong>Build Options</strong> tab in the <b>External Tools</b> dialog and
  can be any combination of after a clean, during a manual build or during auto builds. Let's see how this works.</p>
  <ol>
    <li>Select the <code>HW</code> project in one of the navigation views. In the workbench menu bar, choose <b>Project
    &gt; Clean...</b> Select <b>Clean selected projects</b> and click <b>Ok</b></li>
    <li>The project is rebuilt and the <code>projectBuilder.xml</code> buildfile is run. Notice the output from this
    buildfile in the <b><a href=
    "PLUGINS_ROOT/org.eclipse.jdt.doc.user/reference/views/console/ref-console_view.htm">Console view</a></b>.</li>
    <li>Make sure the Autobuild preference is turned on, then make some trivial change to <code>HelloWorld.java</code>
    and save the change. The save triggers an auto build, but the auto build does not trigger the project builder.</li>
    <li>Suppose we don't want to see the buildfile output every time it runs. Go back to the <b>External Tools
    Builders</b> page of the project properties dialog on <code>HW</code>. Select the <code>Makejar</code> entry and
    click <b>Edit...</b>. On the <b>Main</b> tab, un-check the <b>Capture Output</b> option, apply the change and exit
    back to the workbench.</li>
  </ol>
  <p>This concludes our look at Ant buildfiles as project builders in Eclipse. It's worth repeating that though this
  example used a Java project, project builders are not tied to Java, and may be used for <a href=
  "qs-96_non_ant_pjs.htm">any type of project</a>.</p>
  <h3 class="related">Related Tasks</h3><a href="qs-82_create.htm">Creating Ant buildfiles</a><br>
  <a href="qs-83_edit.htm">Editing Ant buildfiles</a><br>
  <a href="qs-85_ant_configs.htm">Saving &amp; Reusing Ant options</a><br>
  <a href="qs-84_run_ant.htm">Running Ant buildfiles</a><br>
  <a href="qs-93_project_builder.htm">Creating a project builder Ant buildfile</a><br>
  <a href="qs-93a_project_builder_targets.htm">Project Builder Ant Targets</a><br>
  <a href="qs-92_project_builders.htm">Ant buildfiles as project builders</a><br>
  <a href="qs-95_external_tools.htm">External tools</a><br>
  <a href="qs-96_non_ant_pjs.htm">Non-Ant project builders</a><br>
  <a href="qs-97_standalone_ets.htm">Stand-alone external tools</a>
</body>
</html>
